<?php
//随机小数，先将小数转换为整数 再随机
$data['num'] = rand(1,7);
$rand = array(
    1 => array(0.3,0.6),
    2 => array(0.2,0.6),
    3 => array(0.2,0.5),
    4 => array(0.3,0.6),
    5 => array(0.3,0.7),
    6 => array(0.3,0.8),
    7 => array(0.4,0.6),
);

for ($i=0;$i<10000;$i++) {
    $data['num'] = rand(1,7);
    $data['money'] = mt_rand($rand[$data['num']][0] * 10, $rand[$data['num']][1] * 10) / 10;
    if (0 == $data['money']) {
        print_r($data);
    }
    
}
